#pragma once
#include "Entity.h"

#include "..\Sprite Management\Animation.h"

#include "..\..\SGD Wrappers\SGD_Handle.h"
#include "..\..\SGD Wrappers\SGD_Message.h"

#include <vector>

class Player : public Entity
{
private:
	bool bControl;				// Does the player have control of the Player entity?
	bool bStanding, bRunning, bJumping,
		bAttackLeft, bAttackRight, bAttackUp, bAttackDown, bDie;
	bool bFacingUp, bFacingDown;
	bool bPlayGameOver;
	bool bOnCrumbPlatform;

	Animation animation;

	float fImmuneTime;			// Immunity from attacks
	bool bAuraFlashing;			// Is Aura Flashing
	float fAuraFlashingTimer;	// Timer for Aura Flashing
	float fFadeout = 0;			// Timer for death fading
	SGD::HTexture hPlayerAura = SGD::INVALID_HANDLE;	// Set Aura Image Handle
	SGD::Point spawnLoc;
	SGD::Point archDrawPointLoc;

	// Accessor/Mutator for Arch Draw point
	SGD::Point GetArchDrawPointLoc();
	void SetArchDrawPointLoc(SGD::Point drawPoint);

public:
	Player();
	virtual ~Player();

	int Update(float dt);
	void Render();
	void HandleCollision(const GameObject* collision);
	void HandleAttackCollision(const GameObject* collision);

	bool GetPlayGameOver();
	void SetPlayGameOver(bool bPlay);

	void AdjustCamera();
	void MoveLeft();
	void MoveRight();
	void NoInput();
	void Attack(float dt);
	SGD::Point GetSpawnLoc();
	void SetSpawnLoc(SGD::Point loc);

	// Accessor/Mutator For On Crumbling Platform to Allow Jumping
	bool IsOnCrumblingPlatformObject();
	void IsOnCrumblingPlatformObject(bool crumbling);
};

